<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <s:form action="deleteOrUpdate" method="post">
					<s:if test="departmentList!=null && departmentList.size!=0">
						<table>
					    	<tr>
					    		<th><input type="button"  value="全选" /></th>
					    		<th>部门号</th>
					    		<th>部门名</th>
					    		
					    	</tr>
					    	<s:iterator value="departmentList" id="row" status="state">
							    <tr>
							    	<td><s:property value="%{#state.index}"/></td>
							    	<td><input type="text" name="departmentList[<s:property value="%{#state.index}"/>].departmentId" readonly="readonly"  value=<s:property value="#row.departmentId"/> /></td>
							    	<td><input type="text" name="departmentList[<s:property value="%{#state.index}"/>].departmentName" value=<s:property value="#row.departmentName"/> /></td>
							    	
							    </tr>
						    </s:iterator>
					    </table>
					
							<input type="button" value="增加"/>
							<input type="submit" name="operate"  value="删除">
				    		<input type="submit"  name="operate" value="修改"/>
					
						</s:if>
						<s:else>
							<p>没有部门！！</p><br/>
						</s:else>
						
					</s:form>
  </body>
</html>
